﻿CREATE FUNCTION dbo.NLin_NSIProduct
	(
	@ID int
	)
RETURNS int
AS
	BEGIN
	DECLARE @n_prod_u int
	
	SELECT @n_prod_u = COUNT(ID) FROM PRODUCT_UNIT WHERE NSI_PRODUCT_ID = @ID
	
	RETURN @n_prod_u
	END
